package com.sdtw.bookshop.shop.service.impl;

import com.sdtw.bookshop.shop.bean.BookInfo;
import com.sdtw.bookshop.shop.mapper.BookMapper;
import com.sdtw.bookshop.shop.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BookServiceImpl implements BookService {
@Autowired
    private BookMapper bookMapper;
    @Override
    public List<BookInfo> findAll() {
        return bookMapper.findAll();
    }

    @Override
    public void addBook(BookInfo bookInfo) {
        bookMapper.addBook(bookInfo);
    }

    @Override
    public void updateBookInfo(Integer id) {
        bookMapper.updateBookInfo(id);
    }

    @Override
    public BookInfo findByBookId(int id) {
        return bookMapper.findByBookId(id);
    }

    @Override
    public void deleteBookInfo(int id) {
        bookMapper.deleteBookInfo(id);
    }
}
